package org.pattern.SingletonPattern.Emperor;
/**
 * 高并发，请注意单例模式的线程同步问题
 * @author Mr.zyl
 */
public class Singleton {

	private static Singleton singleton = null;

	private Singleton() {
	}

	public static Singleton getSingleton() {
		if (singleton == null) {
			singleton = new Singleton();
		}
		return singleton;
	}

	public static void say() {
		System.out.println("demo");
	}
}
